package com.numberone.web.controller.live;

import com.numberone.common.page.TableDataInfo;
import com.numberone.framework.web.base.BaseController;
import com.numberone.system.domain.Live;
import com.numberone.system.service.ILiveService;
import com.numberone.system.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/api/live")
public class LiveApiController extends BaseController{

    @Autowired
    private ILiveService liveService;

    @ResponseBody
    @RequestMapping("/getLiveList")
    public JsonResult getLiveList()
    {
        List<Live> lives = liveService.selectLiveList(null);
        TableDataInfo dataTable = getDataTable(lives);
        return JsonResult.success(dataTable);
    }
}
